import 'package:flutter_taotaoshipin/http/request/goods_list.dart';
import 'package:flutter_taotaoshipin/model/base_entity.dart';
import 'package:flutter_taotaoshipin/model/goods_list_entity.dart';
import 'package:hi_net/hi_net.dart';

class GoodsDao {
  /// 充值套餐模块,id 充值套餐ID，不传就全部拉
  static Future<BaseEntity<List<GoodsListEntity>>> list([int? id]) async {
    var request = GoodsListRequest();
    if (id != null) {
      request.add('id', id);
    }
    var result = await HiNet.getInstance().fire(request);
    return BaseEntity<List<GoodsListEntity>>.fromJson(result);
  }
}
